<?php
if ($_SESSION['login_user']['status'] != 'admin' || LZ_MODULE != 'admin') die('Access Denied');
LZ_MODULE != 'admin' && die('Access Denied');
$action = $_GET['action'];
$m = $_GET['m'];
include_once('model/hot.php');
$hot = new LZ_Hot;

if ($m == 'empty')
{
	echo $hot->delete_all()?'success':'error';
	die;
}
else if ($m == 'change_keyword_name')
{
	$name1 = $_GET['old_name'];
	$name2 = $_POST['value'];
	if ($name1 && $name2 && $hot->change_keyword_name($name1,$name2))
		echo $name2;
	else
		echo 'error';
	die;
}

$view_data['items'] = $hot->get_list();
$view_data['page_description'] = HOT_SEARCH;
?>